home *** CD-ROM | disk | FTP | other *** search
- // This library adds some convenience functions to COFFEE
- // (C) MAXON Computer GmbH 2000
-
- GetActiveDocument()
- {
- var doc = GetFirstDocument(); if (!doc) return NULL;
-
- if (doc->GetBit(BIT_ADOC)) return doc; // first element is already the active one
-
- return doc->SearchNext(BIT_ADOC);
- }
-
- GetActiveObject(doc)
- {
- var op = doc->GetFirstObject(); if (!op) return NULL;
-
- if (op->GetBit(BIT_AOBJ)) return op; // first element is already the active one
-
- return op->SearchNext(BIT_AOBJ);
- }
-
- GetActiveTag(op)
- {
- var tag = op->GetFirstTag(); if (!tag) return NULL;
-
- if (tag->GetBit(BIT_ATAG)) return tag; // first element is already the active one
-
- return tag->SearchNext(BIT_ATAG);
- }
-